export default async function ({event, data}) {
  try {
    const data = await $w.cloud.callDataSource({
      dataSourceName: "sydwbkzyml_3g153sc",
      methodName: "wedaGetRecordsV2",
      params: {
        // 排序
        orderBy: [
          {
            createdAt: "desc", // 创建时间，倒序
          },
        ],
        // 返回total字段
        getCount: true,
        // 页面大小
        pageSize: 1,
        // 当前页面
        pageNumber: 1,
      },
    });
    console.log("请求结果", data); // "{"records":[{"owner":"1559148626461061122","createdAt":1690378222467,"createBy":"1559148626461061122","updateBy":"1559148626461061122","name":"foo","_id":"f8f6930864c11fee007010104a2589c4","email":"bar@weda.io","updatedAt":1690378222467}],"total":1}"
  } catch (e) {
    console.log("错误代码", e.code, "错误信息", e.message);
  }
}